package com.cakemallproject.service.impl;

import com.cakemallproject.mapper.OrdersMapper;
import com.cakemallproject.pojo.mapperObj.Orders;
import com.cakemallproject.service.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

@Service
public class OrdersServiceImpl implements OrdersService {
    @Autowired
    private OrdersMapper ordersMapper;

    @Override
    public List<Orders> list() {
        return ordersMapper.list();
    }

    @Override
    public void insert(Orders orders) {
        ordersMapper.insert(orders);
    }

    @Override
    public void delete(List<Integer> ids) {
        ordersMapper.delete(ids);
    }

    @Override
    public Orders getByCreateTimeAndUid(LocalDateTime createTime, Integer uid) {
        return ordersMapper.getByCreateTimeAndUid(createTime,uid);
    }

    @Override
    public void complete(List<Integer> ids) {
        ordersMapper.complete(ids);
    }

    @Override
    public void deliver(List<Integer> ids) {
        ordersMapper.deliver(ids);
    }

    @Override
    public List<Integer> getOidByStatus(Integer status) {
        return ordersMapper.getOidByStatus(status);
    }

    @Override
    public List<Orders> getByUid(Integer uid) {
        return ordersMapper.getByUid(uid);
    }

}
